package edu.hawaii.wattwaiter.page.gridinfo;

import java.io.Serializable;

/**
 * The <code>Hour</code> class describes an hour of the day along with
 * what color flag it has been assigned for WattWaiter.
 * 
 * @author Remy Baumgarten
 */
public class Hour implements Serializable {

  private static final long serialVersionUID = 1L;
  private String hour;
  private int attribute;

  /**
   * Creates a new <code>Hour</code> object and initializes what
   * hour it holds and what flag is set to it.
   * 
   * @param hour The hour to store.
   * @param attribute The flag for the hour.
   */
  public Hour(String hour, int attribute) {
    super();
    this.hour = hour;
    this.attribute = attribute;
  }

  /**
   * Sets the flag attribute for this <code>Hour</code> item.
   * @param attribute The new flag attribute's value.
   */
  public void setAttribute(int attribute) {
    this.attribute = attribute;
  }

  /**
   * Returns the flag attribute for this <code>Hour</code> item.
   * @return The current flag attribute for this item.
   */
  public int getAttribute() {
    return attribute;
  }

  /**
   * Sets the hour to store in this <code>Hour</code> item.
   * @param hour The new hour for this item.
   */
  public void setHour(String hour) {
    this.hour = hour;
  }

  /**
   * Returns the hour that is being stored in this <code>Hour</code> item.
   * @return The current hour for this item.
   */
  public String getHour() {
    return hour;

  }

}
